package cn.wusifx.zabbix.request.builder.host;

import cn.wusifx.zabbix.request.BaseRequest;
import cn.wusifx.zabbix.request.builder.UpdateRequestBuilder;

import java.util.Map;

/**
 * https://www.zabbix.com/documentation/4.0/manual/api/reference/host/update
 */
public class HostUpdateRequestBuilder extends UpdateRequestBuilder {
    private String hostId;
    public HostUpdateRequestBuilder(String auth) {
        super("host.update", auth);
    }

    public HostUpdateRequestBuilder(Long id, String auth) {
        super("host.update", id, auth);
    }

    public String getHostId() {
        return hostId;
    }

    public HostUpdateRequestBuilder setHostId(String hostId) {
        this.hostId = hostId;
        return this;
    }

    @Override
    public BaseRequest<Map<String, Object>> builder() {
        baseRequest.getParams().put("hostid",hostId);
        return baseRequest;
    }
}
